#include<stdio.h>
#include<stdlib.h>
int main(void)
{
	int mm,dd,yyyy;

	FILE *fp1;
	FILE *fp2;

	scanf("%d/%d/%d",&mm,&dd,&yyyy);
	if((fp1=fopen("date.txt","w"))==NULL)
	{
		printf("File open error!\n");
		exit(0);
	}
    
    fprintf(fp1,"%d/%d/%d",mm,dd,yyyy);
	
	if(fclose(fp1))
	{
		printf("File open error!\n");
		exit(0);
	

	
	}
	if((fp2=fopen("date.txt","r"))==NULL)
	{
		exit(0);
	}
	fscanf(fp2,"%d/%d/%d",&mm,&dd,&yyyy);

	printf("%4d.%2d.%2d\n",yyyy,mm,dd);
	if(fclose(fp2))
	{
		exit(0);
	}
	return 0;
}


